package com.kyivmohyla.kma2.factory;

import com.kyivmohyla.kma2.dao.Dao;
import com.kyivmohyla.kma2.exception.DAOConfigurationException;
import com.kyivmohyla.kma2.model.*;

public abstract class DAOFactory {

    private static final int ORACLE = 1;

    @SuppressWarnings("UnusedDeclaration")
    public static DAOFactory getDAOFactory(int factory) {
        switch (factory) {
            case ORACLE:
                return new OracleDAOFactory();
            default:
                throw new DAOConfigurationException("Database type is null");
        }
    }

    public abstract Dao<Customer> getCustomerDao();

    public abstract Dao<Equipment> getEquipmentDao();

    public abstract Dao<History> getHistoryDao();

    public abstract Dao<Order> getOrderDao();

    public abstract Dao<OrderServEquip> getOrderServEquipDao();

    public abstract Dao<Position> getPositionDao();

    public abstract Dao<Refs> getRefsDao();

    public abstract Dao<Service> getServiceDao();

    public abstract Dao<Staff> getStaffDao();

    public abstract Dao<State> getStateDao();
}
